//
//  RegisterViewController.m
//  A_GOGO
//
//  Created by Liuiu on 16/1/25.
//  Copyright © 2016年 www.lanou3g.com. All rights reserved.
//

#import "RegisterViewController.h"
#import "LoginViewController.h"
#import "UIColor+Wonderful.h"

@interface RegisterViewController ()

@end

@implementation RegisterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title =@"账号注册";
    self.view.backgroundColor =[UIColor beigeColor];
    
    UIBarButtonItem *item =[[UIBarButtonItem alloc]initWithTitle:@"" style:UIBarButtonItemStylePlain target:self action:@selector(left:)];
    self.navigationItem.leftBarButtonItems = @[item];
    
#pragma mark - 注册布局
    
    UILabel *zhang =[[UILabel alloc]initWithFrame:CGRectMake(35, 65, 60, 30)];
    zhang.text = @"账号:";
    zhang.textAlignment = NSTextAlignmentRight;
    [self.view addSubview:zhang];
    [zhang release];
    
    UITextField *zhangt =[[UITextField alloc]initWithFrame:CGRectMake(105, 65, 190, 40)];
    zhangt.layer.cornerRadius = 7;
    zhangt.placeholder = @"请输入账号";
    zhangt.layer.borderWidth = UITextBorderStyleBezel;
    zhangt.layer.borderColor = [UIColor whiteColor].CGColor;
    [self.view addSubview:zhangt];
    [zhangt release];
    
    UILabel *serct =[[UILabel alloc]initWithFrame:CGRectMake(35, 125, 60,30)];
    serct.text = @"密码:";
    serct.textAlignment = NSTextAlignmentRight;
    [self. view addSubview:serct];
    [serct release];
    
    UITextField *serctt = [[UITextField alloc]initWithFrame:CGRectMake(105, 125, 190, 40)];
    serctt.layer.cornerRadius = 7;
    serctt.placeholder = @"请输入密码";
    serctt.layer.borderWidth = UITextBorderStyleBezel;
    serctt.layer.borderColor = [UIColor whiteColor].CGColor;
    [self.view addSubview:serctt];
    [serctt release];
    
    
    UILabel *sercta =[[UILabel alloc]initWithFrame:CGRectMake(5, 185, 90,30)];
    sercta.text =@"确认密码:";
    
    sercta.textAlignment = NSTextAlignmentRight;
    [self. view addSubview:sercta];
    [sercta release];
    
    UITextField *serctta = [[UITextField alloc]initWithFrame:CGRectMake(105, 185, 190, 40)];
    serctta.layer.cornerRadius = 7;
    serctta.placeholder = @"请再次输入密码";
    serctta.layer.borderWidth = UITextBorderStyleBezel;
    serctta.layer.borderColor = [UIColor whiteColor].CGColor;
    [self.view addSubview:serctta];
    [serctta release];
    
    UILabel *email =[[UILabel alloc]initWithFrame:CGRectMake(35, 245, 60,30)];
    email.text = @"邮箱:";
    email.textAlignment = NSTextAlignmentRight;
    [self. view addSubview:email];
    [email release];
    
    UITextField *emailt = [[UITextField alloc]initWithFrame:CGRectMake(105, 245, 190, 40)];
    emailt.layer.cornerRadius = 7;
    emailt.placeholder = @"请输入邮箱地址";
    emailt.layer.borderWidth = UITextBorderStyleBezel;
    emailt.layer.borderColor = [UIColor whiteColor].CGColor;
    [self.view addSubview:emailt];
    [emailt release];
    
    UILabel *phone =[[UILabel alloc]initWithFrame:CGRectMake(35, 305, 60, 30)];
    phone.text = @"手机号:";
    phone.textAlignment = NSTextAlignmentRight;
    [self.view addSubview:phone];
    [phone release];
    
    UITextField *iphone =[[UITextField alloc]initWithFrame:CGRectMake(105, 305, 190, 40)];
    iphone.layer.cornerRadius =7;
    iphone.placeholder = @"请输入手机号";
    iphone.layer.borderColor = [UIColor whiteColor].CGColor;
    iphone.layer.borderWidth = UITextBorderStyleBezel;
    [self.view addSubview:iphone];
    [iphone release];
    
//********* button区
    UIButton *back =[UIButton buttonWithType:UIButtonTypeCustom];
    [back addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside];
    back.frame = CGRectMake(50, 450, 100, 40);
    [back setTitle:@"返回" forState:UIControlStateNormal];
    back.layer.cornerRadius = 7;
    back.backgroundColor =[UIColor doderBlue];
    back.layer.borderWidth = 0.2;
    [self.view addSubview:back];
    
    UIButton *success =[UIButton buttonWithType:UIButtonTypeCustom];
    success.frame = CGRectMake(225, 450, 100, 40);
    [success addTarget:self action:@selector(Suc:) forControlEvents:UIControlEventTouchUpInside];
    [success setTitle:@"登录" forState:UIControlStateNormal];
    success.layer.cornerRadius = 7;
    success.backgroundColor = [UIColor doderBlue];
    success.layer.borderWidth = 0.2;
    [self.view addSubview:success];
    
    
}
- (void)Suc:(UIButton *)btn
{
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)back:(UIButton *)b
{
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)left:(UIBarButtonItem *)btn
{
    NSLog(@"为了去掉系统的返回键");
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
